package top.fwpsl.config.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 集群模式配置
 *
 * @auther: 风戏fw
 * @date: 2020/11/21
 */
@Component
@ConfigurationProperties(prefix = RedisClusterProperty.PREFIX)
public class RedisClusterProperty {
    public static final String PREFIX = "redis.cluster";

    private int maxIdle;

    private int minIdle;

    private int maxTotal;

    private int maxWaitMillis;

    private int connectionTimeout;

    private int soTimeout;

    private int maxAttempts;

    private List<String> serverHosts;

    public int getMaxIdle() {
        return maxIdle;
    }

    public void setMaxIdle(int maxIdle) {
        this.maxIdle = maxIdle;
    }

    public int getMinIdle() {
        return minIdle;
    }

    public void setMinIdle(int minIdle) {
        this.minIdle = minIdle;
    }

    public int getMaxTotal() {
        return maxTotal;
    }

    public void setMaxTotal(int maxTotal) {
        this.maxTotal = maxTotal;
    }

    public int getMaxWaitMillis() {
        return maxWaitMillis;
    }

    public void setMaxWaitMillis(int maxWaitMillis) {
        this.maxWaitMillis = maxWaitMillis;
    }

    public int getConnectionTimeout() {
        return connectionTimeout;
    }

    public void setConnectionTimeout(int connectionTimeout) {
        this.connectionTimeout = connectionTimeout;
    }

    public int getSoTimeout() {
        return soTimeout;
    }

    public void setSoTimeout(int soTimeout) {
        this.soTimeout = soTimeout;
    }

    public int getMaxAttempts() {
        return maxAttempts;
    }

    public void setMaxAttempts(int maxAttempts) {
        this.maxAttempts = maxAttempts;
    }

    public List<String> getServerHosts() {
        return serverHosts;
    }

    public void setServerHosts(List<String> serverHosts) {
        this.serverHosts = serverHosts;
    }
}
